import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginVue from '../views/LoginVue.vue'
import HomeVue from '../views/HomeVue.vue'
import UserHome from '../views/UserHome.vue'
import UserManage from '../views/UserManage.vue'
import RoleManage from '../views/RoleManage.vue'
import PermissionManage from '../views/PermissionManage.vue'
import RankManage from '../views/RankManage.vue'
import PostsManage from '../views/PostsManage.vue'
import DepartmentManage from '../views/DepartmentManage.vue'
import MenuManage from '../views/MenuManage.vue'
import CreateProcess from '../views/CreateProcess.vue'
import CreatePoint from '../views/CreatePoint.vue'
import CarManage from '../views/CarManage.vue'
import SalaryVue from '../views/SalaryVue.vue'
import PointStyle from '../views/PointStyle.vue'
import MyProcess from '../views/MyProcess.vue'
import WorksDeal from '../views/WorksDeal.vue'
import LoginLog from '../views/LoginLog.vue'

Vue.use(VueRouter)

const routes = [
  // 登录
  {
    path: '/',
    name: 'login',
    component: LoginVue
  },
  // 首页菜单
  {
    path: '/home',
    name: 'home',
    component: HomeVue
  },
  // 首页
  {
    path: '/userhome',
    name: 'userhome',
    component: UserHome
  },
  // 用户管理
  {
    path: '/usermanage',
    name: 'usermanage',
    component: UserManage
  },
  // 角色管理
  {
    path: '/rolemanage',
    name: 'rolemanage',
    component: RoleManage
  },
  // 权限管理
  {
    path: '/permissionmanage',
    name: 'permissionmanage',
    component: PermissionManage
  },
  // 职级管理
  {
    path: '/rankmanage',
    name: 'rankmanage',
    component: RankManage
  },
  // 岗位管理
  {
    path: '/postsmanage',
    name: 'postsmanage',
    component: PostsManage
  },
  // 部门管理
  {
    path: '/departmentmanage',
    name: 'departmentmanage',
    component: DepartmentManage
  },
  // 菜单管理
  {
    path: '/carmanage',
    name: 'carmanage',
    component: CarManage
  },
  // 菜单管理
  {
    path: '/menumanage',
    name: 'menumanage',
    component: MenuManage
  },
  // 创建流程
  {
    path: '/createprocess',
    name: 'createprocess',
    component: CreateProcess
  },
  // 创建节点
  {
    path: '/createpoint',
    name: 'createpoint',
    component: CreatePoint
  },
  // 工资条管理
  {
    path: '/salaryvue',
    name: 'salaryvue',
    component: SalaryVue
  },
  // 节点样式
  {
    path: '/pointstyle',
    name: 'pointstyle',
    component: PointStyle
  },
  // 我的流程
  {
    path: '/myprocess',
    name: 'myprocess',
    component: MyProcess
  },
  // 业务处理
  {
    path: '/worksdeal',
    name: 'worksdeal',
    component: WorksDeal
  },
  // 登陆日志
  {
    path: '/loginlog',
    name: 'loginlog',
    component: LoginLog
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
